//
//  NBAVTool.h
//  音视频合成demo
//
//  Created by VictorLiu on 2018/10/19.
//  Copyright © 2018 VictorLiu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "NBRecordAudioModel.h"
#import "NBVideoModel.h"

@interface NBAVTool : NSObject

#pragma mark --- 音频处理
/** 开始录音 */
+ (void)startRecordAudio:(void(^)(BOOL success, NSString *errorStr))successBlock;

/** 结束录音 */
+ (void)stopRecordAudio:(void(^)(BOOL success, NSString *errorStr, NBRecordAudioModel *audio))audioBlock;

/** 删除本地音频文件 */
+ (void)deleteLocalRecordAudio:(NSString *)path finish:(void(^)(BOOL success, NSString *errorStr))finishBlock;

/** 合并音频文件 */
+ (void)mergeAudio:(NSArray *)pathArray completionHandle:(void(^)(BOOL success, NSString *errorStr, NBRecordAudioModel *audio))audioBlock;

/** 播放音频 */
+ (void)playAudioPath:(NSString *)path withCompletionHandle:(void(^)(BOOL success, NSString *errorStr))completionHandle;

#pragma mark --- 音视频处理
/**
 音视频合成
 导入的音频覆盖视频的音频
 导出合成后的视频
 */
+ (void)mergeAudio:(NSString *)audioPath andVideo:(NSString *)videoPath completionHandle:(void(^)(BOOL success, NSString *errorStr, NBVideoModel *video))videoBlock;

/** 播放视频 */
+ (void)playVideoPath:(NSString *)path withCompletionHandle:(void(^)(BOOL success, NSString *errorStr))completionHandle;

@end
